from flask import jsonify
class LCGCard:
    """ LCG Card"""
    title="unknown"
    house="unknown"

    def __init__(self, db, id):
        cur = db.execute('select title, house from t_cards where _id=%i' % id)
        card = cur.fetchone()
        self.title = card[0]
        self.house = card[1]

    def json_card(self):
        return jsonify(title=self.title, house=self.house)
